#include <iostream>
// #include <vector>
using namespace std;

class Solution {
public:
    long record[50];
    bool recorded[50];
    Solution(){
        for(int i=0;i<50;i++)recorded[i]=false;
        record[0]=0;
        record[1]=1;
        record[2]=2;
        for(int i=0;i<3;i++)recorded[i]=true;
    }
    int climbStairs(int n) {
        if(recorded[n]){
            return this->record[n];
        }
        recorded[n]=true;
        return record[n]=(this->climbStairs(n-1)+this->climbStairs(n-2));
    }
};

int main() {
    Solution a;
    int n;
    cin>>n;
    cout<<a.climbStairs(n)<<endl;
    return 0;
}